<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>AngularJs Controller</title>
</head>
<body ng-app="myApp" ng-controller="myCtrl">
	<div>
		<p>姓名:<input type="text" ng-model="aname" placeholder="你的姓名"></p>
		<p>ng-bind输出：<span ng-bind="aname | lowercase"></span></p>
		<p>表达式输出：{{aname | uppercase}}</p>
		<h2>有序数组</h2>
		<p>arrs={{arrs}}</p>
		<p><span ng-repeat="i in arrs">{{i}},</span></p>
		<h2>集合对象</h2>
		<p>users={{users}}</p>
		<table width="300px" border="1">
			<tr>
				<th>Id</th>
				<th>Name</th>
			</tr>
			<tr ng-repeat="user in users">
				<td>{{user.id}}</td>
				<td>{{user.name}}</td>
			</tr>
		</table>
	</div>
<script type="text/javascript" src="http://lib.sinaapp.com/js/angular.js/angular-1.2.19/angular.min.js"></script>
<script type="text/javascript">
	var app = angular.module('myApp', []);
	app.controller('myCtrl',function ($scope) {
		$scope.aname = "your name";
		$scope.arrs=[0,1,2,3,4,5,6,7,8,9];
		$scope.users=[{id:1,name:'XiaoM'},{id:2,name:'DaBai'},{id:3,name:'LvXia'}];
	})
</script>
</body>
</html>